<?php
namespace Admin\Model;
use Think\Model;

class PostModel extends Model{
    /**
     * 查询帖子相关信息
     * @param unknown $where
     * @return unknown|boolean
     */
    public function find_postsInfo($where){
        $result = $this->where($where)->select();
        if($result){
            return $result;
        }else{
            return false;
        }
    }
    
    
    /**
     * 查找帖子
     * @param unknown $where
     */
    public function find_post($where){
        $result = $this->where($where)->find();
        if($result){
            return $result;
        }else{
            return false;
        }
    }
    
    /**
     * 保存信息
     * @param unknown $where
     * @param unknown $data
     */
    public function save_postInfo($where,$data){
        $result = $this->where($where)->save($data);
        if($result){
            return true;
        }else{
            return false;
        }
    }
    
    public function add_postInfo($data){
        $result = $this->add($data);
        if($result){
            return true;
        }else{
            return false;
        }
    }
}

?>